package com.dmcb.trade.business.crawlers.article;

import com.dmcb.trade.business.constants.CrawlConstant;
import org.springframework.stereotype.Service;

/**
 * Created by zhoun on 2016/9/30.
 */
@Service
public class BoAoParser extends BaseParser{

    /**
     * 获取作者选择器
     * @return
     */
    @Override
    protected String authorNameSelect() {
        return "div#container>div.dimagejj>span.zz_name_r";
    }

    /**
     * 获取封面选择器
     * @return
     */
    @Override
    protected String coverSelect() {
        return "div.fb-box>div.f_zw list1>div.img>a>img[src]";
    }

    /**
     *获取正文内容选择器
     * @return
     */
    @Override
    protected String bodySelect() {
        return "div.text_body,span.fb-zw-nr";
    }

    /**
     * 获取发布日期选择器
     * @return
     */
    @Override
    protected String dateSelect() {
        return "div.dimagejj>span:eq(2)";
    }

    /**
     * 获取标题选择器
     * @return
     */
    @Override
    protected String titleSelect() {
        return "h3.title";
    }

    /**
     * 网站url链接
     * @return
     */
    @Override
    protected String url() {
        return CrawlConstant.BOAOREVIEW_URL;
    }

    /**
     * 网站
     * @return
     */
    @Override
    protected String platform() {
        return "博鳌观察br中文网";
    }

}
